/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.*;

/**
 *
 * @author Pedro
 */
@Entity
@DiscriminatorValue("Owner")
public class Owner extends Person{
    @OneToMany(mappedBy="Owner")
    private List<Pet> pets ;

    public Owner() {
        super();
        pets = new ArrayList<>();
    }
    
    public Owner(String name, String lastName, String birthPlace){
        super(name, lastName, birthPlace);
    }
    
    public Owner(String name, String lastName, String ssn, Date birthDate, String birthPlace){
        super(name, lastName, ssn, birthDate, birthPlace);
    }

    public void setPets(List<Pet> pets) {
        this.pets = pets;
    }

    public List<Pet> getPets() {
        return pets;
    }

    public String getTotalSpent() {
        return "total";
    }
}
